<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
                      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
    <title>Where is the currency? - Zend Framework Manual</title>

    <link href="../css/shCore.css" rel="stylesheet" type="text/css" />
    <link href="../css/shThemeDefault.css" rel="stylesheet" type="text/css" />
    <link href="../css/styles.css" media="all" rel="stylesheet" type="text/css" />
</head>
<body>
<h1>Zend Framework</h1>
<h2>Programmer's Reference Guide</h2>
<ul>
    <li><a href="../en/zend.currency.position.html">Inglês (English)</a></li>
    <li><a href="../pt-br/zend.currency.position.html">Português Brasileiro (Brazilian Portuguese)</a></li>
</ul>
<table width="100%">
    <tr valign="top">
        <td width="85%">
            <table width="100%">
                <tr>
                    <td width="25%" style="text-align: left;">
                    <a href="zend.currency.description.html">What makes a currency?</a>
                    </td>

                    <td width="50%" style="text-align: center;">
                        <div class="up"><span class="up"><a href="zend.currency.html">Zend_Currency</a></span><br />
                        <span class="home"><a href="manual.html">Programmer's Reference Guide</a></span></div>
                    </td>

                    <td width="25%" style="text-align: right;">
                        <div class="next" style="text-align: right; float: right;"><a href="zend.currency.number.html">How does the currency look like?</a></div>
                    </td>
                </tr>
            </table>
<hr />
<div id="zend.currency.position" class="section"><div class="info"><h1 class="title">Where is the currency?</h1></div>
    

    <p class="para">
        The position where the currency sign or name will be displayed depends on the locale.
        Still, when you want to define this setting yourself you have to use the
        <span class="property">display</span> option and provide one of the following constants:
    </p>

    <table id="zend.currency.position.table-1" class="doctable table"><div class="info"><caption><b>Available positions for the currency</b></caption></div>
        

        
            <thead valign="middle">
                <tr valign="middle">
                    <th>Constant</th>
                    <th>Description</th>
                </tr>

            </thead>


            <tbody valign="middle" class="tbody">
                <tr valign="middle">
                    <td align="left"><b><tt>STANDARD</tt></b></td>
                    <td align="left">Sets the standard position as defined within the locale</td>
                </tr>


                <tr valign="middle">
                    <td align="left"><b><tt>RIGHT</tt></b></td>

                    <td align="left">
                        Displays the currency representation at the right side of the value
                    </td>
                </tr>


                <tr valign="middle">
                    <td align="left"><b><tt>LEFT</tt></b></td>

                    <td align="left">
                        Displays the currency representation at the left side of the value
                    </td>
                </tr>

            </tbody>
        
    </table>


    <div class="example" id="zend.currency.position.example-1"><div class="info"><p><b>Example #1 Setting the currency position</b></p></div>
        

        <div class="example-contents"><p>
            Let&#039;s assume that your client has again set &quot;en_US&quot; as locale. Using no option the
            returned value could look like this:
        </p></div>

        <pre class="programlisting brush: php">
$currency = new Zend_Currency(
    array(
        &#039;value&#039; =&gt; 100,
    )
);

print $currency; // Could return &#039;$ 100&#039;
</pre>


        <div class="example-contents"><p>
            So by using the default setting the currency (in our case $) could either be
            rendered left or right from the value. Now let&#039;s define a fixed position:
        </p></div>

        <pre class="programlisting brush: php">
$currency = new Zend_Currency(
    array(
        &#039;value&#039;    =&gt; 100,
        &#039;position&#039; =&gt; Zend_Currency::RIGHT,
    )
);

print $currency; // Could return &#039;100 $&#039;;
</pre>


        <div class="example-contents"><p>
            Note that in the second snippet the position of <acronym class="acronym">USD</acronym> is fixed
            regardless of the used locale or currency.
        </p></div>
    </div>
</div>
        <hr />

            <table width="100%">
                <tr>
                    <td width="25%" style="text-align: left;">
                    <a href="zend.currency.description.html">What makes a currency?</a>
                    </td>

                    <td width="50%" style="text-align: center;">
                        <div class="up"><span class="up"><a href="zend.currency.html">Zend_Currency</a></span><br />
                        <span class="home"><a href="manual.html">Programmer's Reference Guide</a></span></div>
                    </td>

                    <td width="25%" style="text-align: right;">
                        <div class="next" style="text-align: right; float: right;"><a href="zend.currency.number.html">How does the currency look like?</a></div>
                    </td>
                </tr>
            </table>
</td>
        <td style="font-size: smaller;" width="15%"> <style type="text/css">
#leftbar {
	float: left;
	width: 186px;
	padding: 5px;
	font-size: smaller;
}
ul.toc {
	margin: 0px 5px 5px 5px;
	padding: 0px;
}
ul.toc li {
	font-size: 85%;
	margin: 1px 0 1px 1px;
	padding: 1px 0 1px 11px;
	list-style-type: none;
	background-repeat: no-repeat;
	background-position: center left;
}
ul.toc li.header {
	font-size: 115%;
	padding: 5px 0px 5px 11px;
	border-bottom: 1px solid #cccccc;
	margin-bottom: 5px;
}
ul.toc li.active {
	font-weight: bold;
}
ul.toc li a {
	text-decoration: none;
}
ul.toc li a:hover {
	text-decoration: underline;
}
</style>
 <ul class="toc">
  <li class="header home"><a href="manual.html">Programmer's Reference Guide</a></li>
  <li class="header up"><a href="manual.html">Programmer's Reference Guide</a></li>
  <li class="header up"><a href="reference.html">Zend Framework Reference</a></li>
  <li class="header up"><a href="zend.currency.html">Zend_Currency</a></li>
  <li><a href="zend.currency.introduction.html">Introduction to Zend_Currency</a></li>
  <li><a href="zend.currency.usage.html">Using Zend_Currency</a></li>
  <li><a href="zend.currency.options.html">Options for currencies</a></li>
  <li><a href="zend.currency.description.html">What makes a currency?</a></li>
  <li class="active"><a href="zend.currency.position.html">Where is the currency?</a></li>
  <li><a href="zend.currency.number.html">How does the currency look like?</a></li>
  <li><a href="zend.currency.value.html">How much is my currency?</a></li>
  <li><a href="zend.currency.calculation.html">Calculating with currencies</a></li>
  <li><a href="zend.currency.exchange.html">Exchanging currencies</a></li>
  <li><a href="zend.currency.additional.html">Additional informations on Zend_Currency</a></li>
 </ul>
 </td>
    </tr>
</table>

<script type="text/javascript" src="../js/shCore.js"></script>
<script type="text/javascript" src="../js/shAutoloader.js"></script>
<script type="text/javascript" src="../js/main.js"></script>

</body>
</html>